import java.util.Arrays;
import java.util.Scanner;

public class test18 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();// 数组的个数
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = i+1;
        }
        System.out.println(Arrays.toString(getResult(nums)));
    }

    public static int[] getResult(int[] nums){
        if(nums.length == 0)
            return nums;
        // 因为是有序的,所以就是直接两两交换
        int flag = 1; // 直接跳过第一个
        while (flag+1 < nums.length){
            int tmp = nums[flag];
            nums[flag] = nums[++flag];
            nums[flag] = tmp;
            flag++;
        }
        for (int i = 0; i < nums.length; i++) {
            System.out.print(nums[i]+" ");
        }
        return nums;
    }
}
